package com.wtu.sys.servlet;

import com.wtu.bean.Academy;
import com.wtu.bean.Course;
import com.wtu.bean.Hobby;
import com.wtu.bean.Manage;
import com.wtu.bean.Result;
import com.wtu.bean.Student;

public class WriteInfo {
	public static String write(Academy academy){
		String msg="";
		msg+="<tr>"
				+"<td>"+academy.getAcademy_no()+"</td>"
				+"<td>"+academy.getName()+"</td>"
				+"<td>"+academy.getManage_no()+"</td>"
				+"</tr>";
		return msg;
	}
	
	public static String write(Course course){
		String msg="";
		msg+="<tr>"
				+"<td>"+course.getC_no()+"</td>"
				+"<td>"+course.getChinese_name()+"</td>"
				+"<td>"+course.getEnglish_name()+"</td>"
				+"<td>"+course.getAcademy_no()+"</td>"
				+"<td>"+course.getCredit()+"</td>"
				+"<td>"+course.getClass_hours()+"</td>"
				+"<td>"+course.getTheory_hours()+"</td>"
				+"<td>"+course.getExperiment_hours()+"</td>"
				+"<td>"+course.getComputer_hours()+"</td>"
				+"<td>"+course.getPractice_hours()+"</td>"
				+"<td>"+course.getWeek_hours()+"</td>"
				+"<td>"+course.getEmester()+"</td>"
				+"</tr>";
		return msg;
	}
	
	public static String write(Hobby hobby){
		String msg="";
		msg+="<tr>"
				+"<td>"+hobby.getH_no()+"</td>"
				+"<td>"+hobby.getName()+"</td>"
				+"<td>"+hobby.getType()+"</td>"
				+"</tr>";
		return msg;
	}
	
	public static String write(Manage manage){
		String msg="";
		msg+="<tr>"
				+"<td>"+manage.getM_no()+"</td>"
				+"<td>"+manage.getName()+"</td>"
				+"<td>"+manage.getSex()+"</td>"
				+"</tr>";
		return msg;
	}
	
	public static String write(Result result){
		String msg="";
		msg+="<tr>"
				+"<td>"+result.getNo()+"</td>"
				+"<td>"+result.getStudent()+"</td>"
				+"<td>"+result.getCourse()+"</td>"
				+"<td>"+result.getAcademy()+"</td>"
				+"<td>"+result.getScore()+"</td>"
				+"<td>"+result.getCredit()+"</td>"
				+"<td>"+result.getClass_hours()+"</td>"
				+"</tr>";
		return msg;
	}
	
	public static String write(Student student){
		String msg="";
		msg+="<tr>"
				+"<td>"+student.getSno()+"</td>"
				+"<td>"+student.getName()+"</td>"
				+"<td>"+student.getSex()+"</td>"
				+"<td>"+student.getMajor()+"</td>"
				+"<td>"+student.getHobby()+"</td>"
				+"</tr>";
		return msg;
	}

}
